import request from "@/utils/request";

export const uesrList = (params) => {
  return request({
    url: "/v1/rbac/user/list",
    method: "get",
    params,
  });
};

export const createUser = (data) => {
  return request({
    url: "/v1/rbac/user/create",
    method: "post",
    data,
  });
};

export const updateUser = (data) => {
  return request({
    url: "/v1/rbac/user/update",
    method: "post",
    data,
  });
};

export const deleteUser = (data) => {
  return request({
    url: "/v1/rbac/user/delete",
    method: "post",
    data,
  });
};

export const userBindRoles = (data) => {
  return request({
    url: "/v1/rbac/user/roles/bind",
    method: "post",
    data,
  });
};
